package com.vvlive.caibao.smartcity.ui;

import com.vvlive.caibao.smartcity.adapter.ProcessAdapter;
import com.vvlive.caibao.smartcity.base.BaseActivity;
import com.vvlive.caibao.smartcity.bean.ProcessDetails;
import com.vvlive.caibao.smartcity.bean.ProcessHeader;
import com.vvlive.caibao.smartcity.felm.PinnedHeaderListView;
import com.vvlive.caibao.smartcity.view.CommonActionBar;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import smartcity.vvlive.caibao.com.smartc.R;

/**
 * Created by zhj on 2015/11/23.
 * <p/>
 */
public class MeetingProcessActivity extends BaseActivity {

    private PinnedHeaderListView mProcessHeaderListView;

    @Override
    protected int getContentViewRes() {
        return R.layout.activity_meeting_process;
    }

    @Override
    public void initWidget() {
        CommonActionBar actionBar = getCommonActionBar();
        actionBar.setMoreVisible(false);
        actionBar.setTitle(R.string.func_meeting_process);

        mProcessHeaderListView = (PinnedHeaderListView) this.findViewById(R.id.process_list);

        mProcessHeaderListView.setAdapter(new ProcessAdapter(this, getHeaders(), getDetails()));

    }

    private List<List<ProcessDetails>> getDetails() {
        List<List<ProcessDetails>> details = new ArrayList<>();
        details.add(Arrays.asList(new ProcessDetails("与会人员陆续入席", "周杰伦")));
        details.add(Arrays.asList(
                new ProcessDetails("会议开幕致词并通报公司发展概况", "李宗盛"),
                new ProcessDetails("复杂科学管理（A421）", "王学军  陈 燕"),
                new ProcessDetails("社会系统复杂性（A321）", "党兴华 夏火松"),
                new ProcessDetails("管理系统复杂性A（B338）", "柳瑞禹  刁兆峰"),
                new ProcessDetails("管理系统复杂性B（B430）", "史本山  李 杰")
        ));
        details.add(Arrays.asList(new ProcessDetails("部门划分及岗位职责", "罗大佑")));
        details.add(Arrays.asList(new ProcessDetails("销售部管理规定", "林夕")));
        details.add(Arrays.asList(new ProcessDetails("公司财务综合管理和流程", "王菲")));
        details.add(Arrays.asList(new ProcessDetails("平台开发进展通报（提问讨论）", "蔡依林")));
        details.add(Arrays.asList(new ProcessDetails("客服流程和试题库发展", "林忆莲")));
        details.add(Arrays.asList(new ProcessDetails("通报视频产品现状", "崔健")));
        details.add(Arrays.asList(new ProcessDetails("市场部工作计划", "张学友")));
        details.add(Arrays.asList(new ProcessDetails("会议总结及致词", "孙楠")));
        return details;
    }

    private List<ProcessHeader> getHeaders() {
        List<ProcessHeader> headers = new ArrayList<>();
        headers.add(new ProcessHeader(1, "13:30-14:00"));
        headers.add(new ProcessHeader(2, "14:00-14:15"));
        headers.add(new ProcessHeader(3, "14:15-14:25"));
        headers.add(new ProcessHeader(4, "14:25-14:55"));
        headers.add(new ProcessHeader(5, "14:55-15:20"));
        headers.add(new ProcessHeader(6, "15:20-17:20"));
        headers.add(new ProcessHeader(7, "17:35-18:00"));
        headers.add(new ProcessHeader(8, "13:30-14:00"));
        headers.add(new ProcessHeader(9, "18:00-18:30"));
        headers.add(new ProcessHeader(10, "18:30-18:50"));
        return headers;
    }

}
